import request from '@/utils/request'

export const GetCategoryService = (mt) => request.get('/table/category', { params: { mt } })

// 添加果蔬分类
export const AddCategoryService = (data) => request.post('/admin/category', data)
// 编辑果蔬分类
export const EditCategoryService = (data) => request.put('/admin/category', data)
// 删除果蔬分类
export const DelCategoryService = (id) => {
  return request.delete('/admin/category', {
    params: { id }
  })
}

export const vegeFruGetListService = (params) => request.get('/table', { params })

export const vegeFruAddService = (data) => request.post('/admin/table', data)

export const vegeFruGetDetailService = (id) => request.get('/table/detail', { params: { id } })

export const vegeFruEditService = (data) => request.put('/admin/table', data)

export const vegeFruDelService = (id) => request.delete('/admin/table', { params: { id } })
